package com.lineage.server.clientpackets;

import com.lineage.echo.ClientExecutor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class C_AutoLogin extends ClientBasePacket {
  private static final Log _log = LogFactory.getLog(C_AutoLogin.class);
  
  public void start(byte[] decrypt, ClientExecutor client) {
    try {
      read(decrypt);
      int mode = readC();
      if (mode == 0) {
        String loginName = readS().toLowerCase();
        String srcpassword = readS();
        C_AuthLogin authLogin = new C_AuthLogin();
        authLogin.checkLogin(client, loginName, srcpassword, true);
      } 
    } catch (Exception exception) {
    
    } finally {
      over();
    } 
  }
  
  public String getType() {
    return getClass().getSimpleName();
  }
}
